<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="content-language" content="zh-CN" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="applicable-device" content="pc,mobile">
    <meta name="robots" content="all" />
    <meta name="save" content="history" />
    <meta name="author" content="{$GLOBALS['TS_CF']['info']['email']}" />
    <meta name="Copyright" content="{$GLOBALS['TS_CF']['info']['name']}" />
    <title>{if $GLOBALS['TS_URL']['app']=='home' && $GLOBALS['TS_URL']['ac']=='index'}{$GLOBALS['TS_SITE']['site_title']}{if $title} - {$title}{/if}{elseif $GLOBALS['TS_URL']['app']=='home' && $GLOBALS['TS_URL']['ac']!='index'}{$title} - {$GLOBALS['TS_SITE']['site_title']}{elseif  $GLOBALS['TS_URL']['app']!='home' && $GLOBALS['TS_URL']['ac']=='index'}{$GLOBALS['TS_APP']['appname']}_{$GLOBALS['TS_SITE']['site_title']}{else}{$title}_{$GLOBALS['TS_APP']['appname']}_{$GLOBALS['TS_SITE']['site_title']}{/if}
    </title>
    {if  $GLOBALS['TS_URL']['app']=='home' && $GLOBALS['TS_URL']['ac']=='index'}
    <meta name="keywords" content="{$GLOBALS['TS_SITE']['site_key']}" />
    <meta name="description" content="{$GLOBALS['TS_SITE']['site_desc']}" />
    {else}
    {if $sitekey}<meta name="keywords" content="{$sitekey}" /> {/if}
    {if $sitedesc}<meta name="description" content="{$sitedesc}" /> {/if}
    {/if}
    <link rel="shortcut icon" href="{SITE_URL}favicon.ico" />
    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="{SITE_URL}public/bootstrap/css/bootstrap.min.css">
    <!--bootstrap图标库-->
    <link rel="stylesheet" href="{SITE_URL}public/bootstrap-icons/bootstrap-icons.css">

    <link rel="stylesheet" type="text/css" href="{SITE_URL}theme/sample/base.css?v={php echo time();}" />
    {if is_file('app/'.$GLOBALS['TS_URL']['app'].'/skin/style.css')}
    <link rel="stylesheet" type="text/css" href="{SITE_URL}app/{$GLOBALS['TS_URL']['app']}/skin/style.css?v=2022">
    {else}
    <link rel="stylesheet" type="text/css" href="{SITE_URL}app/{$GLOBALS['TS_URL']['app']}/skins/default/style.css">
    {/if}
    <!--新风格加载-->
    {if is_file('theme/'.$GLOBALS['tstheme'].'/style.css')}
    <link rel="stylesheet" type="text/css" href="{SITE_URL}theme/{$GLOBALS['tstheme']}/style.css" id="tsTheme" />
    {/if}
    <script>var siteUrl = '{SITE_URL}';</script>
    <script src="{SITE_URL}public/js/jquery.min.js" type="text/javascript"></script>
    <!--jquery向下兼容-->
    <script src="{SITE_URL}public/js/jquery-migrate.js" type="text/javascript"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="{SITE_URL}public/bootstrap/js/bootstrap.min.js"></script>
    <!--bootstrap 前端验证-->
    <script type="text/javascript" src="{SITE_URL}public/js/bootstrap3-validation.js"></script>

    {if $GLOBALS['TS_CF']['urllock']}
    <script type="text/javascript">
        var urllock="$GLOBALS['TS_CF']['urllock']";if(document.domain!=urllock){top.location.href=siteUrl;}
    </script>
    {/if}
    <style>
        {php doAction('pub_header_css')}
    </style>
    {php doAction('pub_header_top')}
    {php doAction('gobad','pub_header')}
</head>
<body>

<nav class="navbar navbar-expand-lg navbar-dark header" role="navigation">
    <div class="container">


            <a class="navbar-brand" href="{SITE_URL}"><img title="{$GLOBALS['TS_SITE']['site_title']}" src="{SITE_URL}uploadfile/logo/{$GLOBALS['TS_SITE']['logo']}" alt="{$GLOBALS['TS_SITE']['site_title']}" height="30" /></a>


        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText" aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
            <span class="bi bi-justify"></span>
        </button>



        <div class="collapse navbar-collapse" id="navbarText">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item active">
                    <a class="nav-link" href="{SITE_URL}">首页</a>
                </li>
                {php doAction('pub_header_nav')}
            </ul>
        </div>


        <div class="mr-3"><a class="text-light" href="{tsUrl('search')}"><i class="bi bi-search"></i> 搜索</a></div>





        <div class="ts-user-nav">

            {if $GLOBALS['TS_USER']}

            <a style="color:#fff" class="mr-3" href="{tsUrl('message','my')}"><span class="badge badge-pill badge-light" id="newmsg">0</span>  消息</a>

            <a style="color:#fff" href="#" class="ts-user-nav-dropdown">
                {$GLOBALS['TS_USER']['username']}
                <img width="24" class="rounded-circle" alt="{$GLOBALS['TS_USER']['username']}" src="{$GLOBALS['TS_USER']['face']}">
            </a>

            <div class="ts-dropdown dropdown-list pull-right">
                <ul class="ts-dropdown-list">
                    <li><a href="{tsUrl('my')}" >我的社区</a></li>
                    <li><a href="{tsUrl('my','setting',array('ts'=>'base'))}" >设置</a></li>
                    {if $GLOBALS['TS_SITE']['isinvite']=='1'}
                    <li>
                        <a href="{tsUrl('user','invite')}">邀请</a>
                    </li>
                    {/if}

                    {if $GLOBALS['TS_USER']['isadmin']=='1'}
                    <li>
                        <a target="_blank" href="{SITE_URL}index.php?app=system">管理</a>
                    </li>
                    {/if}
                    <li><a href="{tsUrl('user','logout')}">退出</a></li>
                </ul>
            </div>


            {else}

            <a class="btn btn-info btn-sm" href="{tsUrl('user','login')}">登录</a>
            <a class="btn btn-success btn-sm" href="{tsUrl('user','register')}">注册</a>

            {/if}

        </div>



    </div>
</nav>

<div class="appnav mb-3">
    <div class="container">

            {loop $GLOBALS['TS_SITE']['appnav'] $key $item}
            {if $key=='home'}
            <a {if $GLOBALS['TS_URL']['app']==$key}class="on"{/if} href="{SITE_URL}">{$item}</a>
            {else}
            <a {if $GLOBALS['TS_URL']['app']==$key}class="on"{/if} href="{tsUrl($key)}">{$item}</a>
            {/if}
            {/loop}

    </div>
</div>

<div class="container">{php doAction('gobad','960')}</div>